﻿{include file="public/header"}
<title>订单录入</title>
</head>
<body>


<article class="page-container">
<form>
    <div class="ch-row ch-info-form">
        <div class="flex1">级别：</div>
        <div class="flex2">
            <select name="title" class="form-control" >
                <option selected value="">级别</option>
                <option  value="0">普通合伙人</option>
                <option value="1">高级合伙人</option>
                <option value="2">钻石合伙人</option>
            </select>
        </div>
    </div>
    <div class="ch-row ch-info-form">
        <div class="flex1">佣金：</div>
        <div class="flex2">
            <input  name="yong" class="form-control" value="" placeholder="提成比例">
        </div>
    </div>
    <div class="ch-row ch-info-form">
        <div class="flex1">比例：</div>
        <div class="flex2">
            <input  name="bi" class="form-control" value="" placeholder="提成比例">
        </div>
    </div>
    <div class="ch-row">
        <div class="flex1">
            <button class="btn btn-primary radius" style="width: 100%;" type="button"><i class="Hui-iconfont">&#xe632;</i> 提交</button>
        </div>
    </div>
</form>

</article>
{include file="public/footer"}
<script>
    $('.radius').click(function () {
         var src="{:Url('index/Income/add')}";

            $.ajax({
                type: 'POST',
                url: src,
                dataType: 'json',
                data:$('form').serializeArray(),
                success: function (data) {
                    var res=JSON.parse(data);
                    if(res.code==200){
                        layer.msg(res.msg, {icon: 1, time: 2000}, function (index,layero) {
                            parent.location.reload()
                        });
                    }else{
                        layer.msg(res.msg,{icon: 5,time:1000});
                    }

                },
                error: function (data) {
                    console.log(data.msg);
                },
            });



    });
</script>
</body>
</html>